package com.dk.service.impl;

import com.dk.mapper.RoleUserMapper;
import com.dk.pojo.RoleUser;
import com.dk.service.RoleUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class RoleUserServiceImpl implements RoleUserService {
    @Autowired
    RoleUserMapper roleUserMapper;
    @Override
    public void insertDefaultRoleForUser(Integer uid) {
        RoleUser roleUser = new RoleUser();
        roleUser.setUid(uid);
        roleUser.setRid(2);
        int i = roleUserMapper.insertSelective(roleUser);
        System.out.println(i);
    }
}
